import {useRenderIcon} from "@/utils/soul";


export const getMenuOptions = (trees)  =>{
    return trees.map((menu)=> {
        if (menu.icon ) {
            menu.icon = useRenderIcon(menu.icon)
        }
        if (menu.children && menu.children.length > 0){
            getMenuOptions(menu.children);
        }else {
            delete menu.children
        }
        return menu;
    })
}